Skip to content

Conversation

@rootfs
Copy link
Collaborator

@rootfs rootfs commented Sep 19, 2025

What type of PR is this?

This allows fine grained reasoning control for each model

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes #

Release Notes: Yes/No

…el to support non-reasoning models

Signed-off-by: Huamin Chen <[email protected]>
@netlify
Copy link

netlify bot commented Sep 19, 2025

Deploy Preview for vllm-semantic-router ready!

Name Link
🔨 Latest commit 47d09d2
🔍 Latest deploy log https://app.netlify.com/projects/vllm-semantic-router/deploys/68d00c083eab260008dfb0ec
😎 Deploy Preview https://deploy-preview-178--vllm-semantic-router.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rootfs
Copy link
Collaborator Author

rootfs commented Sep 19, 2025

@yuluo-yx can you review this? thanks

@github-actions
Copy link

github-actions bot commented Sep 19, 2025

👥 vLLM Semantic Team Notification

The following members have been identified for the changed files in this PR and have been automatically assigned:

📁 config

Owners: @rootfs
Files changed:

  • config/config.yaml

📁 src

Owners: @rootfs, @Xunzhuo, @wangchen615
Files changed:

  • src/semantic-router/pkg/config/config.go
  • src/semantic-router/pkg/config/config_test.go
  • src/semantic-router/pkg/extproc/reason_mode_config_test.go
  • src/semantic-router/pkg/extproc/reason_mode_selector.go
  • src/semantic-router/pkg/extproc/reasoning_integration_test.go
  • src/semantic-router/pkg/utils/classification/classifier.go
  • src/semantic-router/pkg/utils/classification/classifier_test.go

📁 website

Owners: @Xunzhuo
Files changed:

  • website/docs/getting-started/configuration.md

vLLM

🎉 Thanks for your contributions!

This comment was automatically generated based on the OWNER files in the repository.

Copy link
Contributor

@yuluo-yx yuluo-yx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return config, nil
}

// BoolPtr returns a pointer to a bool value (helper for tests and config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that this function was only used in the tests. Should it be moved into the tests section instead? The functional code doesn't use it. However, I don't think it's a major issue. It can be improved later.

@github-actions github-actions bot added the lgtm label Sep 20, 2025
for _, category := range c.Categories {
if category.Name == categoryName {
if len(category.ModelScores) > 0 {
useReasoning := category.ModelScores[0].UseReasoning != nil && *category.ModelScores[0].UseReasoning
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why just read the index0?

reasoningStatus := "DISABLED"
if category.UseReasoning {
reasoningStatus = "ENABLED"
// Get the best model for this category (first in the list)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how to define a best model in category? if it is based on score, maybe we should sort the list and get the biggest one? instead of reading the first index

type ModelScore struct {
Model string `yaml:"model"`
Score float64 `yaml:"score"`
Model string `yaml:"model"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use_reasoning: true|false
reasoning_description: "Why reasoning is needed"
reasoning_effort: "low|medium|high"

should we move all these three reasoning related vars into model score?

@rootfs
Copy link
Collaborator Author

rootfs commented Sep 21, 2025

@Xunzhuo thank you for the review. Would it be ok if we have this first and you help refactor the API to be more consistent next? Thanks.

@Xunzhuo
Copy link
Member

Xunzhuo commented Sep 21, 2025

Sure @rootfs

@rootfs rootfs merged commit 0292153 into vllm-project:main Sep 21, 2025
9 checks passed
@rootfs
Copy link
Collaborator Author

rootfs commented Sep 21, 2025

@Xunzhuo great!

yossiovadia pushed a commit to yossiovadia/semantic-router that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants